home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_08_09
/
8n09038a
< prev
next >
Wrap
Text File
|
1990-07-19
|
478b
|
25 lines
char *aprintf_base;
char aprintf_ofst;
const char *aprintf(const char *Format, ...)
{
va_list Args;
va_start(Args,Format);
aprintf_ofst=0;
aprintf_base=NULL;
vdprintf(aprintf_out,Format,Args);
aprintf_out('\0');
va_end(Args);
return aprintf_base;
}
int aprintf_out(int Char)
{
aprintf_base=realloc(aprintf_base,aprintf_ofst+1);
if (aprintf_base==NULL)
return EOF;
aprintf_base[aprintf_ofst++]=Char;
return Char;
}